import screens.screen
from pygameExt import pygameext
import pygame
from pygame.locals import *
import os
class graphicsScreen(screens.screen.screeninherit):
    """A graphics Screen is a screen that has graphics,
    For example the title screen is a graphics screen.
    And so is the ending screen."""
    def __init__(self, screen, image, nextscreen, screenname=""):
        self.nextscreen = nextscreen
        self.image = image
        self.screen = screen
        
    def init(self):
        self.screen.fill((0,0,0))
        background=pygame.image.load(os.path.join('../data/images', self.image))
        self.screen.blit(background, (0,0))
        self.keylisteners =[screens.screen.keyListener(K_SPACE, self.next())]
        pygameext.Ezwrite("Press Space to Continue", self.screen, 24, 400, 550, 200, 30)
        
    def next(self):
        self.nextscene = self.nextscreen
    
    def loop(self):
        return